export default {
  install(Vue) {
    // console.log("@@@install", Vue)
    Vue.filter('mySlice', function (value) {
      return value.slice(0, 4)
    })

    Vue.directive("fbind", {
      bind(element, binding) {
        element.value = binding.value
      },
      inserted(element, binding) {
        element.focus()
      },
      update(element, binding) {
        element.value = binding.value
      }
    })

    Vue.mixin({
      data() {
        return {
          x: 100,
          y: 200
        }
      }
    })

    // 给Vue原型上添加一个方法
    Vue.prototype.hello = ()=>{alert("Hello")}
  }
}